using com.google.zxing;
using System;
namespace MicroMsg.UI.Util
{
	public class PhotoCameraLuminanceSource : LuminanceSource
	{
		public byte[] PreviewBufferY
		{
			get;
			private set;
		}
		public override sbyte[] Matrix
		{
			get
			{
				return (sbyte[])this.PreviewBufferY;
			}
		}
		public PhotoCameraLuminanceSource(int width, int height) : base(width, height)
		{
			this.PreviewBufferY = new byte[width * height];
		}
		public override sbyte[] getRow(int int_0, sbyte[] sbyte_0)
		{
			if (sbyte_0 == null || sbyte_0.Length < this.get_Width())
			{
				sbyte_0 = new sbyte[this.get_Width()];
			}
			for (int i = 0; i < this.get_Height(); i++)
			{
				sbyte_0[i] = (sbyte)this.PreviewBufferY[i * this.get_Width() + int_0];
			}
			return sbyte_0;
		}
	}
}
